import Vue from 'vue'
import VueRouter from 'vue-router'
import SellerPage from '@/views/SellerPage.vue'
import TrendPage from '@/views/TrendPage.vue'
import MapPage from '@/views/MapPage.vue'
import RankPage from '@/views/RankPage.vue'
import HotPage from '@/views/HotPage.vue'
import StockPage from '@/views/StockPage.vue'
import ScreenPage from '@/views/ScreenPage.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/sellerPage',
    name: 'sellerPage',
    component: SellerPage
  },
  {
    path: '/trendPage',
    name: 'trendPage',
    component: TrendPage
  },
  {
    path: '/mapPage',
    name: 'MapPage',
    component: MapPage
  },
  {
    path: '/rankPage',
    name: 'RankPage',
    component: RankPage
  },
  {
    path: '/hotPage',
    name: 'HotPage',
    component: HotPage
  },
  {
    path: '/stockPage',
    name: 'StockPage',
    component: StockPage
  },
  {
    path: '/',
    redirect: '/screenPage'
  },
  {
    path: '/screenPage',
    name: 'ScreenPage',
    component: ScreenPage
  }
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  routes
})

export default router
